import {UnitController} from "../controller/UnitController";
import {TriggerFactory} from "../frame/TriggerFactory";
import {UnitModel} from "../frame/apiModel/adapterModel/model3/UnitModel";
import {PlayerModel} from "../frame/apiModel/adapterModel/model4/PlayerModel";
import {ModelFactory} from "../frame/apiModel/adapterModel/model5/ModelFactory";
import {GlobalEnv} from "../utils/GlobalEnv";

export function buildTrigger() {
    const callback = function (this: void, activeUnit: UnitModel, activePlayer: PlayerModel) {
        UnitController.getInstance().initUnit(activeUnit);
        UnitController.getInstance().addSummoneds(activeUnit);
        UnitController.getInstance().addUnitCombinationByUnit(activeUnit);
    }
    TriggerFactory.getInstance().registerConstructFinish(callback);
}